﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.ComponentModel;
using Microsoft.Win32;
using Microsoft.Windows.Controls.Ribbon;
using System.Xml;
using System.Xml.Linq;
using System.Threading;

namespace GW2_Marketeer__WPF_
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : RibbonWindow, INotifyPropertyChanged
    {
        public MainWindow()
        {
            Marketeer.Instance.PropertyChanged += (sender, e) => { if (e.PropertyName == "Loading") NotifyPropertyChanged("LoadingVisibility"); };

            InitializeComponent();
        }

        #region Properties

        public Visibility LoadingVisibility
        {
            get
            {
                return Marketeer.Instance.Loading ? Visibility.Visible : Visibility.Hidden;
            }
        }

        #endregion

        #region Click Handlers



        #endregion

        #region INotifyPropertyChanged
        
        public event PropertyChangedEventHandler PropertyChanged;
        public void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

        #endregion

    }
}
